<?php if(count($games) <=0) return ''; ?>
<div class="gamebox dressup">
<h3>
	<span>
		<a href="<?php echo category_url($cate->cat_code); ?>" title="Danh mục <?php echo $cate->cat_name; ?>">
		<?php echo @$prefix; ?> <?php echo $cate->cat_name; ?>
		</a>
	</span>
</h3>
<div class="clear"></div>
<div class="parentcate">
  <ul class="first">
	<?php
		$count = 1;
		$first_total = count($games)/2;
		if ($games) foreach ($games as $index => $game) { 
			if ($count > $first_total) 
				break;
			$count++;
	?>
	<li><?php $this->load->view('frontend/box/game', array(
		'game'=> $game,
		'cate'=> $cate
		)); ?></li>
	<?php 
		unset($games[$index]);
		}// end of foreach $games;
	?>
	  
	  <div class="clear"></div>
  </ul>
  <ul>
	<?php
		if ($games) foreach ($games as $game) {	
	?>
	<li>
		<?php $this->load->view('frontend/box/game', array('game'=> $game)); ?>
	</li>
	<?php 
		
		}// end of foreach $games;
	?>
  <div class="clear"></div>
</div>
</div>